home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / demos301.zip / DEMO4.CTL < prev    next >
Text File  |  1993-01-14  |  22KB  |  650 lines

  1. ; DEMO4.CTL
  2. ; Showing the features of the system
  3.  
  4. - (ONCE)
  5. LOADLOGO ^EBATSYMBOL^ 3
  6. DATA 221,0,24,28,60,62,63,127,127,127,255,255,255,239,206,132,128
  7. DATA 222,66,126,126,126,126,255,255,255,255,255,255,255,255,126,60,24
  8. DATA 224,0,24,56,60,124,252,254,254,254,255,255,255,247,115,33,1
  9.  
  10. - (GLOBAL)
  11. SET LOGO ^P25,50^C2^EBATSYMBOL^^C4What ^C1is^C4 The DEMO System?
  12. KEY (ESC) POP               /* Pop back to previous screen
  13. KEY (A-C) CALL @COLOR       /* Switch display to color set
  14. KEY (A-M) CALL @MONO        /* Switch display to monochrome set
  15.  
  16. - (SET1) Defaults for full-screen functions
  17. KEY (HOME)         FIELD FIRST
  18. KEY (UP),(LEFT)    FIELD -1
  19. KEY (DOWN),(RIGHT) FIELD +1
  20. KEY (END)          FIELD LAST
  21.  
  22. - *MENUW.001
  23. PAUSE DEMO  .1
  24. BUFFER (SPACE)(SPACE)(SPACE)(SPACE)(SPACE)(SPACE)(SPACE)
  25. KEY (ANY)      SCREEN  1
  26. /.
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.      ▒▒▒▄     ▒▒▒▄                                                    ▒▒▄
  45.       ▒▒█     ▒▒█▀                                                    ▒▒█
  46.       ▒▒█     ▒▒█   ▒▒▒▒▒▒▄ ▒▒▄     ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ ▒▒█
  47.       ▒▒█ ▒▒▄ ▒▒█   ▒▒█▀▀▀▀ ▒▒█     ▒▒█▀▀▀▀ ▒▒█▀▒▒█ ▒▒█▒▒█▒▒█ ▒▒█▀▀▀▀ ▒▒█
  48.       ▒▒█ ▒▒█ ▒▒█   ▒▒▒▒▄   ▒▒█     ▒▒█     ▒▒█ ▒▒█ ▒▒█▒▒█▒▒█ ▒▒▒▒▄   ▒▒█
  49.       ▒▒█ ▒▒█ ▒▒█   ▒▒█▀▀   ▒▒█     ▒▒█     ▒▒█ ▒▒█ ▒▒█ ▀▀▒▒█ ▒▒█▀▀    ▀▀
  50.       ▒▒▒▒▒▒▒▒▒▒█   ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ ▒▒▒▒▒▒█ ▒▒█   ▒▒█ ▒▒▒▒▒▒▄ ▒▒▄
  51.        ▀▀▀▀▀▀▀▀▀▀    ▀▀▀▀▀▀  ▀▀▀▀▀▀  ▀▀▀▀▀▀  ▀▀▀▀▀▀  ▀▀    ▀▀  ▀▀▀▀▀▀  ▀▀
  52. ./
  53.  
  54. /* ------------------------------------------------------
  55.  
  56. - *MENUW.002
  57. KEY (ANY)      SCREEN  1
  58. /.
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.      ▒▒▒▄     ▒▒▒▄                                                    ▒▒▄
  74.       ▒▒█     ▒▒█▀                                                    ▒▒█
  75.       ▒▒█     ▒▒█   ▒▒▒▒▒▒▄ ▒▒▄     ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ ▒▒█
  76.       ▒▒█ ▒▒▄ ▒▒█   ▒▒█▀▀▀▀ ▒▒█     ▒▒█▀▀▀▀ ▒▒█▀▒▒█ ▒▒█▒▒█▒▒█ ▒▒█▀▀▀▀ ▒▒█
  77.       ▒▒█ ▒▒█ ▒▒█   ▒▒▒▒▄   ▒▒█     ▒▒█     ▒▒█ ▒▒█ ▒▒█▒▒█▒▒█ ▒▒▒▒▄   ▒▒█
  78.       ▒▒█ ▒▒█ ▒▒█   ▒▒█▀▀   ▒▒█     ▒▒█     ▒▒█ ▒▒█ ▒▒█ ▀▀▒▒█ ▒▒█▀▀    ▀▀
  79.       ▒▒▒▒▒▒▒▒▒▒█   ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ ▒▒▒▒▒▒█ ▒▒█   ▒▒█ ▒▒▒▒▒▒▄ ▒▒▄
  80.        ▀▀▀▀▀▀▀▀▀▀    ▀▀▀▀▀▀  ▀▀▀▀▀▀  ▀▀▀▀▀▀  ▀▀▀▀▀▀  ▀▀    ▀▀  ▀▀▀▀▀▀  ▀▀
  81. ./
  82.  
  83. /* ------------------------------------------------------
  84.  
  85. - *MENUW.003
  86. KEY (ANY)      SCREEN  1
  87. /.
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.      ▒▒▒▄     ▒▒▒▄                                                    ▒▒▄
  100.       ▒▒█     ▒▒█▀                                                    ▒▒█
  101.       ▒▒█     ▒▒█   ▒▒▒▒▒▒▄ ▒▒▄     ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ ▒▒█
  102.       ▒▒█ ▒▒▄ ▒▒█   ▒▒█▀▀▀▀ ▒▒█     ▒▒█▀▀▀▀ ▒▒█▀▒▒█ ▒▒█▒▒█▒▒█ ▒▒█▀▀▀▀ ▒▒█
  103.       ▒▒█ ▒▒█ ▒▒█   ▒▒▒▒▄   ▒▒█     ▒▒█     ▒▒█ ▒▒█ ▒▒█▒▒█▒▒█ ▒▒▒▒▄   ▒▒█
  104.       ▒▒█ ▒▒█ ▒▒█   ▒▒█▀▀   ▒▒█     ▒▒█     ▒▒█ ▒▒█ ▒▒█ ▀▀▒▒█ ▒▒█▀▀    ▀▀
  105.       ▒▒▒▒▒▒▒▒▒▒█   ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ ▒▒▒▒▒▒█ ▒▒█   ▒▒█ ▒▒▒▒▒▒▄ ▒▒▄
  106.        ▀▀▀▀▀▀▀▀▀▀    ▀▀▀▀▀▀  ▀▀▀▀▀▀  ▀▀▀▀▀▀  ▀▀▀▀▀▀  ▀▀    ▀▀  ▀▀▀▀▀▀  ▀▀
  107. ./
  108.  
  109. /* ------------------------------------------------------
  110.  
  111. - *MENUW.004
  112. KEY (ANY)      SCREEN  1
  113. /.
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.      ▒▒▒▄     ▒▒▒▄                                                    ▒▒▄
  123.       ▒▒█     ▒▒█▀                                                    ▒▒█
  124.       ▒▒█     ▒▒█   ▒▒▒▒▒▒▄ ▒▒▄     ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ ▒▒█
  125.       ▒▒█ ▒▒▄ ▒▒█   ▒▒█▀▀▀▀ ▒▒█     ▒▒█▀▀▀▀ ▒▒█▀▒▒█ ▒▒█▒▒█▒▒█ ▒▒█▀▀▀▀ ▒▒█
  126.       ▒▒█ ▒▒█ ▒▒█   ▒▒▒▒▄   ▒▒█     ▒▒█     ▒▒█ ▒▒█ ▒▒█▒▒█▒▒█ ▒▒▒▒▄   ▒▒█
  127.       ▒▒█ ▒▒█ ▒▒█   ▒▒█▀▀   ▒▒█     ▒▒█     ▒▒█ ▒▒█ ▒▒█ ▀▀▒▒█ ▒▒█▀▀    ▀▀
  128.       ▒▒▒▒▒▒▒▒▒▒█   ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ ▒▒▒▒▒▒█ ▒▒█   ▒▒█ ▒▒▒▒▒▒▄ ▒▒▄
  129.        ▀▀▀▀▀▀▀▀▀▀    ▀▀▀▀▀▀  ▀▀▀▀▀▀  ▀▀▀▀▀▀  ▀▀▀▀▀▀  ▀▀    ▀▀  ▀▀▀▀▀▀  ▀▀
  130. ./
  131.  
  132. /* ------------------------------------------------------
  133.  
  134. - *MENUW.005
  135. KEY (ANY)      SCREEN  1
  136. /.
  137.  
  138.  
  139.  
  140.  
  141.  
  142.      ▒▒▒▄     ▒▒▒▄                                                    ▒▒▄
  143.       ▒▒█     ▒▒█▀                                                    ▒▒█
  144.       ▒▒█     ▒▒█   ▒▒▒▒▒▒▄ ▒▒▄     ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ ▒▒█
  145.       ▒▒█ ▒▒▄ ▒▒█   ▒▒█▀▀▀▀ ▒▒█     ▒▒█▀▀▀▀ ▒▒█▀▒▒█ ▒▒█▒▒█▒▒█ ▒▒█▀▀▀▀ ▒▒█
  146.       ▒▒█ ▒▒█ ▒▒█   ▒▒▒▒▄   ▒▒█     ▒▒█     ▒▒█ ▒▒█ ▒▒█▒▒█▒▒█ ▒▒▒▒▄   ▒▒█
  147.       ▒▒█ ▒▒█ ▒▒█   ▒▒█▀▀   ▒▒█     ▒▒█     ▒▒█ ▒▒█ ▒▒█ ▀▀▒▒█ ▒▒█▀▀    ▀▀
  148.       ▒▒▒▒▒▒▒▒▒▒█   ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ ▒▒▒▒▒▒█ ▒▒█   ▒▒█ ▒▒▒▒▒▒▄ ▒▒▄
  149.        ▀▀▀▀▀▀▀▀▀▀    ▀▀▀▀▀▀  ▀▀▀▀▀▀  ▀▀▀▀▀▀  ▀▀▀▀▀▀  ▀▀    ▀▀  ▀▀▀▀▀▀  ▀▀
  150. ./
  151.  
  152. /* ------------------------------------------------------
  153.  
  154. - *MENUW.006
  155. KEY (ANY)      SCREEN  1
  156. /.
  157.  
  158.  
  159.      ▒▒▒▄     ▒▒▒▄                                                    ▒▒▄
  160.       ▒▒█     ▒▒█▀                                                    ▒▒█
  161.       ▒▒█     ▒▒█   ▒▒▒▒▒▒▄ ▒▒▄     ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ ▒▒█
  162.       ▒▒█ ▒▒▄ ▒▒█   ▒▒█▀▀▀▀ ▒▒█     ▒▒█▀▀▀▀ ▒▒█▀▒▒█ ▒▒█▒▒█▒▒█ ▒▒█▀▀▀▀ ▒▒█
  163.       ▒▒█ ▒▒█ ▒▒█   ▒▒▒▒▄   ▒▒█     ▒▒█     ▒▒█ ▒▒█ ▒▒█▒▒█▒▒█ ▒▒▒▒▄   ▒▒█
  164.       ▒▒█ ▒▒█ ▒▒█   ▒▒█▀▀   ▒▒█     ▒▒█     ▒▒█ ▒▒█ ▒▒█ ▀▀▒▒█ ▒▒█▀▀    ▀▀
  165.       ▒▒▒▒▒▒▒▒▒▒█   ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ ▒▒▒▒▒▒█ ▒▒█   ▒▒█ ▒▒▒▒▒▒▄ ▒▒▄
  166.        ▀▀▀▀▀▀▀▀▀▀    ▀▀▀▀▀▀  ▀▀▀▀▀▀  ▀▀▀▀▀▀  ▀▀▀▀▀▀  ▀▀    ▀▀  ▀▀▀▀▀▀  ▀▀
  167. ./
  168.  
  169. /* ------------------------------------------------------
  170.  
  171. - *MENUW.007
  172. KEY (ANY)      SCREEN  1
  173. /.
  174.      ▒▒▒▄     ▒▒▒▄                                                    ▒▒▄
  175.       ▒▒█     ▒▒█▀                                                    ▒▒█
  176.       ▒▒█     ▒▒█   ▒▒▒▒▒▒▄ ▒▒▄     ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ ▒▒█
  177.       ▒▒█ ▒▒▄ ▒▒█   ▒▒█▀▀▀▀ ▒▒█     ▒▒█▀▀▀▀ ▒▒█▀▒▒█ ▒▒█▒▒█▒▒█ ▒▒█▀▀▀▀ ▒▒█
  178.       ▒▒█ ▒▒█ ▒▒█   ▒▒▒▒▄   ▒▒█     ▒▒█     ▒▒█ ▒▒█ ▒▒█▒▒█▒▒█ ▒▒▒▒▄   ▒▒█
  179.       ▒▒█ ▒▒█ ▒▒█   ▒▒█▀▀   ▒▒█     ▒▒█     ▒▒█ ▒▒█ ▒▒█ ▀▀▒▒█ ▒▒█▀▀    ▀▀
  180.       ▒▒▒▒▒▒▒▒▒▒█   ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ ▒▒▒▒▒▒▄ ▒▒▒▒▒▒█ ▒▒█   ▒▒█ ▒▒▒▒▒▒▄ ▒▒▄
  181.        ▀▀▀▀▀▀▀▀▀▀    ▀▀▀▀▀▀  ▀▀▀▀▀▀  ▀▀▀▀▀▀  ▀▀▀▀▀▀  ▀▀    ▀▀  ▀▀▀▀▀▀  ▀▀
  182. ./
  183.  
  184. - *000 Central menu
  185. SET TOP
  186. SET CURSOR ^C2-->
  187. SET KEYS (SET1)
  188. KEY A,@1        CALL *001                /* Why use it?
  189. KEY B,@2        CALL *002                /* How to create the input screens
  190. KEY C,@3        CALL *003                /* Compilation vs viewing
  191. KEY D,@4        CALL *004                /* Full-screen features
  192. KEY E,@5        CALL *005                /* DOS functions
  193. KEY F,@6        CALL *006                /* Environmental variables
  194. KEY G,@7        CALL *007                /* SET commands
  195. KEY H,@8        CALL *008                /* Reviewing the screen colors
  196. KEY I,@9        CALL *009                /* Other stuff
  197. KEY J,@10       CALL @GRAPHIC            /* Do a GIF
  198. KEY X,@11,(ESC) GOTO @QUIT               /* Quit demo
  199. /.
  200. This subsystem shows the various features of The DEMO System.  See which:
  201.  
  202.              ^K   A. Why would you want to use The DEMO System?
  203.              ^K   B. How to create the input screens
  204.              ^K   C. Compilation vs viewing
  205.              ^K   D. Full-screen features (incl self-running demos)
  206.              ^K   E. DOS functions (including prompting)
  207.              ^K   F. Environmental variables
  208.              ^K   G. SET commands
  209.              ^K   H. Reviewing the screen colors
  210.              ^K   I. Other stuff
  211.              ^K   J. Try a graphic (TSHOW BUGS.GIF)
  212.  
  213.              ^K   X. Quit demo
  214. ./
  215.  
  216. - *001 Why would you use The DEMO System
  217. KEY X,(ESC) POP KEY1
  218. /.
  219. What sort of things can you do with The DEMO System?  Well, there are ^C2lots^C0 of
  220. things you can do with it!  Some ideas:
  221.  
  222.   ^C1-^C0 Create demonstration programs to show people how a bulletin board,
  223.          data base program, or anything other text-based system works.
  224.          You can even design demonstrations for products on hardware
  225.          that the user may not have (like a CD-ROM) so they can better
  226.          determine whether they need to buy the hardware or not.
  227.   ^C1-^C0 Design tutorials to show people how to do things.  You can define
  228.          any keys to do anything you want so you can simulate most
  229.          applications.
  230.   ^C1-^C0 Create help systems.
  231.   ^C1-^C0 Create menuing systems.  You can duplicate most of the features
  232.          of a product like AUTOMENU.
  233.  
  234. Press ^C1X^C0 or ^C1Esc^C0 to return.
  235.  
  236. ./
  237.  
  238. - *002 How to create the input screens
  239. KEY X,(ESC) POP KEY2
  240. /.
  241.                                 ^C1Creating screens
  242.  
  243. The DEMO System runs off a series of ASCII text screens, initially stored as
  244. separate text files.  These screens can be created using screen-capture
  245. facilities or be typed in (like these were).  Once created, you can imbed colors
  246. (up to 8 color combinations per screen) and define keyboard entry zones.
  247.  
  248. The individual screens are referenced in a control file which tells the program
  249. what screens to bring in and which keys cause the system to go to other screens
  250. or do other operations.  For example,
  251.  
  252.                 ; Sample control file
  253.                 - PAGE.001 First screen (has options A to C, then X to quit)
  254.                 KEY A GOTO PAGE.002
  255.                 KEY B GOTO PAGE.003
  256.                 KEY C GOTO PAGE.004
  257.                 KEY X QUIT
  258.                 - PAGE.002 Option A
  259.                 ...
  260.  
  261. The screens are brought in, checked, and combined at compilation time (see this
  262. option).
  263.  
  264. Press ^C1X^C0 or ^C1Esc^C0 to go back.
  265. ./
  266.  
  267. - *003 Compilation vs viewing
  268. KEY X,(ESC) POP KEY3
  269. /.
  270.                            ^C1Compilation vs Viewing
  271.  
  272. The DEMO System consists of two programs.
  273.  
  274. The ^C2compiler^C0 (DEMOMAKE) reviews your control card file for syntax errors.
  275. It tokenizes what it can.  It then reads all of your text screens and searches
  276. for control codes in that file.  At the end of this process, the program takes
  277. all of your files including the control card file and creates a single data file
  278. which is then concatenated to the end of the actual The DEMO System viewer.
  279.  
  280. The combined ^C2viewer^C0/data program is what you give your customers.  They
  281. can't tamper with the screens at all.
  282.  
  283. The shareware fee is required for the use of the compiler, not the viewer.  As a
  284. result, you can distribute the results of your compilations to anyone without
  285. charge.
  286.  
  287. Press ^C1X^C0 or ^C1Esc^C0 to go back.
  288. ./
  289.  
  290. - *004 Full-screen features
  291. SET CURSOR ^C2(^T10)
  292. KEY (HOME)  FIELD FIRST
  293. KEY (UP)    FIELD -3
  294. KEY (DOWN)  FIELD +3
  295. KEY (LEFT)  FIELD -1
  296. KEY (RIGHT) FIELD +1
  297. KEY (END)   FIELD LAST
  298. KEY A,@1    CALL @SELECT A
  299. KEY F,@2    CALL @SELECT F
  300. KEY K,@3    CALL @SELECT K
  301. KEY B,@4    CALL @SELECT B
  302. KEY G,@5    CALL @SELECT G
  303. KEY L,@6    CALL @SELECT L
  304. KEY C,@7    CALL @SELECT C
  305. KEY H,@8    CALL @SELECT H
  306. KEY M,@9    CALL @SELF_RUN
  307. KEY D,@10   CALL @SELECT D
  308. KEY I,@11   CALL @SELECT I
  309. KEY E,@13   CALL @SELECT E
  310. KEY J,@14   CALL @SELECT J
  311. KEY X,@15   POP KEY4
  312. KEY (ESC)   NONE
  313. /.
  314. This is an example of what you can do with The DEMO System's full-screen
  315. selections.  You can have the program branch according to the choices selected.
  316. Select an option using either cursor keys or the letter of the option.  Also
  317. note that there is an example of a self-running demo below (option M) which
  318. demos a system where you'd want to press a series of keystrokes for them.
  319.  
  320.         ^K  Option A       ^K  Option F         ^K  Option K
  321.         ^K  Option B       ^K  Option G         ^K  Option L
  322.         ^K  Option C       ^K  Option H         ^K  SelfRunM
  323.         ^K  Option D       ^K  Option I         ^K
  324.         ^K  Option E       ^K  Option J         ^K  E^C1X^C0it
  325.  
  326.  
  327.  
  328.    ^C2                                                                 ^C2
  329.    ^C2 Notice that the Esc key doesn't work in this screen.  You can   ^C2
  330.    ^C2 enable or disable any keys as desired.                          ^C2
  331.    ^C2                                                                 ^C2
  332. ./
  333.  
  334. - *005 DOS functions
  335. SET KEYS   (SET1)
  336. SET SETTINGS (SET1)
  337. SET CURSOR ^C3(^T1)
  338. KEY 1,@1        CALL @DOS ^EDIR^
  339. KEY 2,@2        CALL @WRITE
  340. KEY 3,@3        CALL @PLAY
  341. KEY 4,@4        CALL @PROMPT
  342. KEY 5,@5        CALL @SAVE
  343. KEY L,@6        CALL *005A
  344. KEY X,@7,(ESC)  POP KEY5
  345. /.
  346. The DEMO System provides direct access to all sorts of DOS functions within your
  347. control card files.  You can use RUN commands to get anything not supported.
  348. Some examples are provided below:
  349.  
  350.   ^K^C11^C0. (DOS) You can do any (small) DOS function you need to do or go to the
  351.      DOS shell itself.  Bigger functions can be done with batch files that
  352.      notice whether The DEMO System has created a given batch file to be run.
  353.   ^K^C12^C0. (WRITE) and (DELETE) You can write lines to a text file (e.g. a batch
  354.      file) if you want to.
  355.   ^K^C13^C0. (PLAY) You can add PLAY commands to your files.  This can simulate
  356.      modem dialing or be used to alert people to errors or whatever.
  357.   ^K^C14^C0. (PROMPT) You can prompt a user for information.
  358.   ^K^C15^C0. (SAVE) You can save the screen to a file.
  359.  
  360.   ^K^C1L^C0. List all available DOS and other action commands.
  361.  
  362.   ^K^C1X^C0. Return to previous menu
  363.  
  364. ./
  365.  
  366. - *005A List of DOS and other action commands.
  367. KEY X,(ESC) POP KEY6
  368. /.
  369. A quick list of the DOS and other action commands that functions worked into The
  370. DEMO System include the following.  Remember that anything that's not here can
  371. be done using the RUN option.
  372.  
  373.   ASSIGN var value                PAUSE [ seconds ]
  374.   BUFFER chars                    PAUSEA [ seconds ]
  375.   CALL screen [ KEYn | parms ]    PAUSE BREAK { ON | OFF }
  376.   CD directory                    PAUSE DELAY seconds
  377.   CDD drive:\directory            PLAY string
  378.   CLS                             PLAY { ON | OFF }
  379.   COPY file1 file2                POP [ TOP | 1 to 20 | KEYn ]
  380.   DELETE file                     PROMPT var pattern string
  381.   DISPLAY { MONO | COLOR }        PROMPTA var pattern string
  382.   DRIVE letter                    QUIT [ return_code ]
  383.   ECHO [ string[@] ]              RD directory
  384.   ECHOA [ string[@] ]             REDRAW
  385.   FIELD change                    RUN [ string ]
  386.   GOTO screen [ KEYn | parms ]    RUNA [ string ]
  387.   KEYPRESS                        SAVE filename
  388.   LOADLOGO ...                    SCREEN change
  389.   LOCATE row col                  WRITE filename string
  390.   MD directory
  391.  
  392. Press ^C1X^C0 or ^C1Esc^C0 to go back.
  393. ./
  394.  
  395. - *006 Environmental variables
  396. KEY X,(ESC) POP KEY6
  397. /.
  398.                            ^C1Environmental variables
  399.  
  400. The DEMO System allows you to pass and act on DOS environmental variables as
  401. well as certain variables that are maintained by the viewer.  These variables
  402. are resolved at viewing time (not during compilation) and can be displayed on
  403. the screen, written to a file, or whatever.  They include:
  404.  
  405.    ^C1DATE^C0    The current system date           : ^EDATE^
  406.    ^C1TIME^C0    The current system time           : ^ETIME^
  407.    ^C1ETIME^C0   Elapsed time since program began  : ^EETIME^
  408.    ^C1DIR^C0     The current DOS directory         : ^EDIR^
  409.    ^C1INITDIR^C0 The initials DOS directory        : ^EINITDIR^
  410.    ^C11^C0-^C19^C0     Passable parameters
  411.  
  412. For debugging purposes, you can also display the following:
  413.  
  414.    ^C1FNAME^C0   The original filename of your input text screen : ^EFNAME^
  415.    ^C1FDESC^C0   Any desc for this page : ^EFDESC^
  416.    ^C1FPAGE^C0   The screen number                               : ^EFPAGE^
  417.    ^C1FIELD^C0   The current field position on the screen        : ^EFIELD^
  418.    ^C1ROW^C0 and ^C1COL^C0  The cursor row and column                  : ^EROW^ ^ECOL^
  419.  
  420. Press ^C1X^C0 or ^C1Esc^C0 to go back.
  421. ./
  422.  
  423. - *007 SET commands
  424. KEY X,(ESC) POP KEY7
  425. /.
  426.                                   ^C1SET commands
  427.  
  428. The DEMO System provides the ability to set certain conditions and defaults at
  429. compilation time.  These can be set for single screens, a series of screens, or
  430. all screens.  They include:
  431.  
  432.   SET CASE { ON | OFF }   Whether input case matters
  433.   SET CLS { ON | OFF }    Whether to clear the screen before display
  434.   SET COLOR settings      What colors to use if a color monitor is detected
  435.   SET CURSOR string       What cursor to use for each prompt
  436.   SET KEYS CLEAR          Clears previously defined key assignments
  437.   SET KEYS SETn           Sets screen's keys to match some template
  438.   SET LOGO string         Any text you want displayed on every screen?
  439.   SET MONO settings       What colors to use if a monochrome monitor is
  440.                             used (or simply to provide an alternative color set)
  441.   SET SETTINGS SETn       Sets screen's other settings to match some template
  442.   SET TOP screen          Determine the maximum screen that a use can pop
  443.                             back to
  444.  
  445. Press ^C1X^C0 or ^C1Esc^C0 to go back.
  446. ./
  447.  
  448. - *008 Reviewing the screen colors
  449. KEY X,(ESC) POP KEY8
  450. /.
  451.                           Reviewing the screen colors
  452.  
  453. The following color sets are set by default in The DEMO System.  You can switch
  454. between the color and monochrome settings by using Alt-C (color) and Alt-M
  455. (monochrome).
  456.  
  457.         ^C0 This is color set 0
  458.         ^C1 This is color set 1
  459.         ^C2 This is color set 2
  460.         ^C3 This is color set 3
  461.         ^C4 This is color set 4
  462.         ^C5 This is color set 5
  463.         ^C6 This is color set 6
  464.         ^C7 This is color set 7
  465.  
  466.  
  467. Press ^C1X^C0 or ^C1Esc^C0 to go back.
  468. ./
  469.  
  470. - *009 Other stuff
  471. SET CLS OFF
  472. KEY (ESC),(ELSE)  POP KEY9
  473. /.
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.   ^C2 ╔══════════════════════════════════════════════════════════════════════╗ ^C0
  492.   ^C2 ║ Another screen.  Notice it didn't clear the old one first?           ║ ^C0
  493.   ^C2 ╟──────────────────────────────────────────────────────────────────────╢ ^C0
  494.   ^C2 ║ Just wanted to show you that!  Press a key please.                   ║ ^C0
  495.   ^C2 ╚══════════════════════════════════════════════════════════════════════╝ ^C0
  496. ./
  497.  
  498. /* ---------------------------- labels ----------------------------------------
  499.  
  500. - @COLOR Switching display to color set
  501. DISPLAY COLOR
  502. REDRAW
  503. POP
  504.  
  505. - @DOS Demonstrating some DOS functions
  506. LOCATE 15 1
  507. ECHOA We're about to hop into DOS and do a DIR command.
  508. ECHOA Note that we could have cleared the screen this time but we didn't.
  509. ECHOA Also note that it's going to a different screen.  Ready?
  510. RUNA DIR *.EXE /W
  511. ECHOA Press a key please
  512. PAUSEA
  513. ECHO ^P20,1We're back!  Now we hop into DOS itself.  Say ^C1EXIT^C0 to return.
  514. RUN
  515. ECHO We're about to copy your AUTOEXEC.BAT file as KILLME.NOW
  516. ECHO Note that you can have the cursor stay in place@
  517. RUN COPY C:\AUTOEXEC.BAT C:\KILLME.NOW
  518. ECHO We're back!  Press a key when ready to continue.
  519. PAUSE
  520. ECHO Let's try some of the directory commands.  Creating directory #T#
  521. MD ^EINITDIR^\#T#
  522. CD ^EINITDIR^\#T#
  523. ECHO Now running DIR.  Note your subdirectory name:
  524. RUN DIR
  525. ECHO Now resetting the directory back to ^EINITDIR^
  526. CD ^EINITDIR^
  527. RD ^EINITDIR^\#T#
  528. ECHO Just removed #T#.  Press a key
  529. PAUSE
  530. POP
  531.  
  532. - @GRAPHIC Loading a graphic file
  533. /* Note that none of The DEMO System options while you're
  534. /* in another program.
  535. RUN TSHOW BUGS.GIF  /* TSHOW is one of those freebie GIF viewers
  536. /* Have to reload the symbol because the program probably screwed it
  537. /* up.
  538. LOADLOGO CLEAR
  539. LOADLOGO ^EBATSYMBOL^ 3
  540. DATA 221,0,24,28,60,62,63,127,127,127,255,255,255,239,206,132,128
  541. DATA 222,66,126,126,126,126,255,255,255,255,255,255,255,255,126,60,24
  542. DATA 224,0,24,56,60,124,252,254,254,254,255,255,255,247,115,33,1
  543. POP
  544.  
  545. - @MONO Switching display to Monochrome and redrawing screen
  546. DISPLAY MONO
  547. REDRAW
  548. POP
  549.  
  550. - @PLAY Seeing how the PLAY commands work
  551. CLS
  552. ECHO Let's try some play command stuff.  Testing...
  553. PLAY mb t180 o2 p2 p8 l8 ggg l2 e- p24 p8 l8 fff l2 d
  554. ECHO That should still be playing.  Press a key when ready.
  555. PAUSE
  556. POP
  557.  
  558. - @PROMPT Testing the various PROMPT options
  559. /* Prompting the user for input.
  560. CLS
  561. ECHO Okay.  Let's prompt the user for something.
  562. ECHO The pattern here is "NNNUU" -- three digits, and two letters
  563. PROMPT ^EUSERID^ NNNUU ^C2Enter your user ID? ^C1
  564. ECHO ^C0
  565. ECHO      The result is ^EUSERID^
  566. ECHO The next one uses the pattern "XXX-UUU-BBB" -- B must be Y/N/T/F
  567. PROMPT ^EANOTHER^ XXX-UUU-BBB ^C2Enter something? ^C1
  568. ECHO ^C0
  569. ECHO      The result was ^EANOTHER^
  570. ECHO The next one uses the pattern "MM/DD/YY"
  571. PROMPT ^EDAT^ MM/dd/yy Enter a date? ^
  572. ECHO ^C0
  573. ECHO       The result was ^EDAT^
  574. ECHO The next one uses the pattern "FILESPEC"
  575. ASSIGN ^EX^
  576. PROMPT ^EX^ Filespec Enter a filespec? ^
  577. ECHO ^C0
  578. ECHO       The result was ^EX^
  579. ECHO The next one uses the pattern "VFILESPEC"
  580. ASSIGN ^EX^
  581. PROMPT ^EX^ VFilespec Enter a filespec? ^
  582. ECHO ^C0
  583. ECHO       The result was ^EX^
  584. ECHO The next one uses the pattern "PATH"
  585. ASSIGN ^EX^
  586. PROMPT ^EX^ PATH Enter a sample path? ^
  587. ECHO ^C0
  588. ECHO       The result was ^EX^
  589. ECHO The next one uses the pattern "VPATH"
  590. ASSIGN ^EX^
  591. PROMPT ^EX^ VPATH Enter a valid path? ^
  592. ECHO ^C0
  593. ECHO       The result was ^EX^
  594. ECHO Press a key please
  595. PAUSE
  596. POP
  597.  
  598. - @QUIT Quitting
  599. LOADLOGO CLEAR
  600. ECHO ^C0
  601. CLS
  602. ECHO Thanks for your interest in The DEMO System
  603. QUIT 5         /* Setting the return code to 5
  604.  
  605. - @SAVE Saving the current screen some place
  606. ECHO ^P20,1You can use device names instead of file names if you want.
  607. ASSIGN ^ENAME^
  608. PROMPT ^ENAME^ FILESPEC ^C2Save screen under what DOS file name?
  609. SAVE ^ENAME^
  610. POP
  611.  
  612. - @SELECT Common subroutine showing what option you picked
  613. ECHO ^P20,1You selected the ^E1^ option at ^ETIME^.  Press a key now.
  614. PAUSE
  615. POP
  616.  
  617. - @SELF_RUN  Self-running demo example
  618. ECHO ^P24,1Showing a self-running demo@
  619. PAUSE 1
  620. PAUSE DEMO 0.4
  621. PAUSE BREAK OFF
  622. BUFFER (HOME)
  623. BUFFER (RIGHT)(RIGHT)(RIGHT)(RIGHT)
  624. ECHO ^P25,1Hopping around still...@
  625. BUFFER (UP)(LEFT)(LEFT)(ENTER)
  626. PLAY mb t180 o2 p2 p8 l8 ggg l2 e- p24 p8 l8 fff l2 d
  627. PAUSE BREAK ON
  628. ECHO ^P24,1Feel free to press Esc to stop this@
  629. BUFFER (UP)(UP)(UP)(UP)(UP)(UP)(UP)(UP)(UP)(UP)(UP)
  630. REDRAW
  631. POP
  632.  
  633. - @WRITE Showing how to write functions work
  634. CLS
  635. ECHO We're writing something to a file called C:\KILLME.NOW
  636. ECHO It includes environmental variables for Time, Date, and your system PROMPT
  637. DELETE C:\KILLME.NOW
  638. WRITE C:\KILLME.NOW This is the first line
  639. WRITE C:\KILLME.NOW And the second
  640. WRITE C:\KILLME.NOW Current date:       ^EDATE^
  641. WRITE C:\KILLME.NOW Current time:       ^ETIME^
  642. WRITE C:\KILLME.NOW Elapsed time:       ^EETIME^
  643. WRITE C:\KILLME.NOW Your system PROMPT: ^EPROMPT^
  644. ECHO Now let's see what the file looks like.
  645. RUN TYPE C:\KILLME.NOW
  646. ECHO Press a key when ready.
  647. PAUSE
  648. POP
  649.  
  650.